NANO106 - Symmetry Computations on $mmm (D_{2h})$ Point Group

by Shyue Ping Ong

This notebook demonstrates the computation of orbits in the mmm point group. It is part of course material for UCSD's NANO106 - Crystallography of Materials. Unlike the $m\overline{3}m (O_h)$ version, this duplicates relevant code from the symmetry package to explicitly demonstrate the priniciples of generating point group symmetry operations.

Preliminaries

Let's start by importing the numpy, sympy and other packages we need.


In [1]:
import numpy as np
import itertools
from sympy import symbols

We will now define a useful function for checking existence of np.arrays in a list of arrays. It is not the most efficient implementation, but would suffice for our purposes.


In [2]:
def in_array_list(array_list, a):
    for i in array_list:
        if np.all(np.equal(a, i)):
            return True
    return False

Generating the Symmetry Operations

Next, we specify the generators for mmm point group, which are the three mirror planes. Note that the existence of the three two-fold rotation axes is implied by the existence of the three mirror planes.


In [3]:
generators = []
for i in xrange(3):
    g = np.eye(3).astype(np.int)
    g[i, i] = -1
    generators.append(g)

We will now generate all the group symmetry operation matrices from the generators.


In [4]:
symm_ops = []
symm_ops.extend(generators)
new_ops = generators

while len(new_ops) > 0:
    gen_ops = []
    for g1, g2 in itertools.product(new_ops, symm_ops):
        #Note that we cast the op to int to improve presentation of the results.
        #This is fine in crystallographic reference frame.
        op = np.dot(g1, g2)
        if not in_array_list(symm_ops, op):
            gen_ops.append(op)
            symm_ops.append(op)
        op = np.dot(g2, g1)
        if not in_array_list(symm_ops, op):
            gen_ops.append(op)
            symm_ops.append(op)
    new_ops = gen_ops
print "The order of the group is %d. The group matrices are:" % len(symm_ops)
for op in symm_ops:
    print op


The order of the group is 8. The group matrices are:
[[-1  0  0]
 [ 0  1  0]
 [ 0  0  1]]
[[ 1  0  0]
 [ 0 -1  0]
 [ 0  0  1]]
[[ 1  0  0]
 [ 0  1  0]
 [ 0  0 -1]]
[[1 0 0]
 [0 1 0]
 [0 0 1]]
[[-1  0  0]
 [ 0 -1  0]
 [ 0  0  1]]
[[-1  0  0]
 [ 0  1  0]
 [ 0  0 -1]]
[[ 1  0  0]
 [ 0 -1  0]
 [ 0  0 -1]]
[[-1  0  0]
 [ 0 -1  0]
 [ 0  0 -1]]

Computing Orbits

Using sympy, we specify the symbolic symbols x, y, z to represent position coordinates. We also define a function to generate the orbit given a set of symmetry operations and a point p.


In [5]:
x, y, z = symbols("x y z")

def get_orbit(symm_ops, p):
    """Given a set of symmops and a point p, this function returns the orbit"""
    orbit = []
    for o in symm_ops:
        pp = np.dot(o, p)
        if not in_array_list(orbit, pp):
            orbit.append(pp)
    return orbit

Orbit for General Position


In [6]:
p = np.array([x, y, z])
print "For the general position %s, the orbit is " % str(p)
for o in get_orbit(symm_ops, p):
    print o,


For the general position [x y z], the orbit is 
[-x y z] [x -y z] [x y -z] [x y z] [-x -y z] [-x y -z] [x -y -z] [-x -y -z]

Orbit for Special Position on two-fold rotation axes


In [7]:
p = np.array([0, 0, z])
orb = get_orbit(symm_ops, p)
print "For the special position %s on the two-fold axis, the orbit comprise %d points:" % (str(p), len(orb))
for o in orb:
    print o,


For the special position [0 0 z] on the two-fold axis, the orbit comprise 2 points:
[0 0 z] [0 0 -z]

The orbit is similar for the other two-fold axes on the a and b axes are similar.

Orbit for Special Position on mirror planes

Positions on the mirror on the a-b plane have coordinates (x, y, 0).


In [8]:
p = np.array([x, y, 0])
orb = get_orbit(symm_ops, p)
print "For the special position %s on the two-fold axis, the orbit comprise %d points:" % (str(p), len(orb))
for o in orb:
    print o,


For the special position [x y 0] on the two-fold axis, the orbit comprise 4 points:
[-x y 0] [x -y 0] [x y 0] [-x -y 0]

The orbit is similar for the other two mirror planes on the a-c and b-c planes are similar.